SET VER=01.00.00
SET COMPILE=RELEASE
set skinsrc=DotNetNuke.Modules.%NAME%.DarkKnight
set skin=DarkKnightEx

if NOT x%1 == x""  set COMPILE=%1
ECHO OFF

del install /Q
md install
del install\instructions /Q
md install\instructions
del install\skins\%skin%\ /Q
md install\skins\%skin%\


SET PROD=DotNetNuke.Modules.SkinObjectsEx
rem no trailing \ on the site variable.  The site variable specifies the root site path for the source website
rem where the developed code sits
set Site=d:\DotNetNuke\dnn611\website

ECHO ================== Start Copy %PROD% ====================================================
ECHO ON
REM Copy out of the bin directory, because all relevant dlls are in there
copy %Prod%\bin\%COMPILE%\DotNetNuke.Modules.SkinObjectsEx.dll Install\
copy %Prod%\bin\%COMPILE%\DotNetNuke.Modules.SkinObjectsEx.pdb Install\

REM Copy the relevant files out of the main directory
REM copy %PROD%\Instructions\*.htm Install\

REM Copy out dnn file, ascx files, licences and local resource files
copy %prod%\*.dnn Install\
copy %prod%\*.ascx Install\
copy %prod%\*.xml Install\
REM copy %prod%\Licence\*.* Install\
REM copy %prod%\App_LocalResources\*.resx Install\

REM copy the sql data provider files out of the data directory
REM copy %prod%\SqlDataProvider\*.SqlDataProvider Install\

ECHO OFF


ECHO ================== Finish Copy  %PROD% ====================================================
ECHO ON

SET INSTALL_ZIP=%PROD%_%VER%_Install.zip
rem zip up the install file
"C:\program files\pkware\pkzipc.exe" -add Install\%INSTALL_ZIP% install\*.* -excl=*.zip
ECHO ON
copy install\%INSTALL_ZIP% \\echidna\ifinity\Installs\%prod%\
copy install\%INSTALL_ZIP% %site%\install\module\
ECHO OFF

ECHO ================== Demo Skin ==============================================================
xcopy %skinsrc%\*.ascx install\skins\%skin%\ /E /Y
xcopy %skinsrc%\*.xml install\skins\%skin%\ /E /Y
xcopy %skinsrc%\*.css install\skins\%skin%\ /E /Y
xcopy %skinsrc%\*.jpg install\skins\%skin%\ /E /Y
xcopy %skinsrc%\*.htm install\skins\%skin%\ /E /Y
xcopy %skinsrc%\*.html install\skins\%skin%\ /E /Y
xcopy %skinsrc%\licence.txt install\skins\%skin%\ /E /Y
xcopy %skinsrc%\releaseNotes.txt install\skins\%skin%\ /E /Y

copy %skinsrc%\*.dnn install\skins\
copy %skinsrc%\*.txt install\skins\

set skin_zip=%skin%.Skin.zip
ECHO ON
CD install\skins\%skin%
"C:\program files\pkware\pkzipc.exe" -add -dir=current %skin_zip% *.* -excl=*.zip
CD ..\..\..

set skin_pack_zip=%PROD%_%VER%_DarkKnight_Skin.zip
"C:\program files\pkware\pkzipc.exe" -add Install\%skin_pack_zip% install\skins\*.dnn -excl=*.zip
"C:\program files\pkware\pkzipc.exe" -add Install\%skin_pack_zip% install\skins\*.txt -excl=*.zip
"C:\program files\pkware\pkzipc.exe" -add Install\%skin_pack_zip% install\skins\%skin%\%skin_zip%

copy install\%skin_Pack_zip% \\echidna\ifinity\Installs\%prod%\
REM copy install\%skin_ZIP% install\instructions

ECHO OFF

ECHO ================ Instruction Files ========================================================
ECHO ON

copy Instructions\*.* Install\Instructions\*.*
set instr_zip=%PROD%_%VER%_Instructions.zip
"C:\program files\pkware\pkzipc.exe" -add Install\%instr_zip% install\instructions\*.* 

copy install\%INSTr_ZIP% \\echidna\ifinity\Installs\%prod%\

